package com.hfqixin.core.util;

import java.lang.reflect.Type;
import java.util.Date;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;


/**
 * GSON实现反序列化
 * @author dev-003
 *
 */
public class UtilDateDeserializer implements JsonDeserializer<java.util.Date> {

	public Date deserialize(JsonElement json, Type typeOfT,
			JsonDeserializationContext context) throws JsonParseException {
		return  new  java.util.Date(json.getAsJsonPrimitive().getAsLong()*1000);  
	}

}